﻿using Abp.AutoMapper;
using Akso.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.Codes.Dto
{
    /// <summary>
    /// 新增、编辑页面显示数据时的Dto对象，可以被其它Dto使用
    /// </summary>
    [AutoMap(typeof(CodeEntity))]
    public class CodeEditDto
    {
        /// <summary>
        /// Set null to create a new object. Set user's Id to update a object.
        /// </summary>
        public Guid? Id { get; set; }
        /// <summary>
        /// 代码名称
        /// </summary>
        [Required]
        [StringLength(CodeEntity.MaxNameLength)]
        public string CodeName { get; set; }
        /// <summary>
        /// 代码值
        /// </summary>
        [Required]
        public string CodeKey { get; set; }
        /// <summary>
        /// 序号
        /// </summary>
        public int SortIndex { get; set; }
        /// <summary>
        /// 代码组ID 外键
        /// </summary>
        [Required]
        public Guid CodeGroupID { get; set; }
    }
}
